package com.pxmeta.dynamic.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pxmeta.dynamic.entity.CommunityDynamicUserLike;
import com.pxmeta.dynamic.entity.dto.DynamicLikeDTO;

import java.util.List;

/**
 * <p>
 * 动态用户点赞表 服务类
 * </p>
 *
 * @author wcl
 * @since 2022-06-26
 */
public interface ICommunityDynamicUserLikeService extends IService<CommunityDynamicUserLike> {

    /**
     * 喜欢
     * @param dto
     * @param userId
     */
    void like(DynamicLikeDTO dto, Long userId);

    /**
     * 查询用户是否喜欢该动态
     * @param userId
     * @param dynamicId
     * @return
     */
    CommunityDynamicUserLike findUserLike(Long userId, Long dynamicId);

    /**
     * 获取用户喜欢的动态
     * @param userId
     * @return
     */
    List<Long> getUserLikeIds(Long userId);
}
